

// Code to match regions and dep

gen length_idpdv=length(id_pdv)
gen dep=substr(id_pdv, 1,1) if length_idpdv==7
replace dep=substr(id_pdv,1,2) if length_idpdv==8
destring dep, replace force
gen dep_str = string(dep,"%02.0f")
drop dep
drop length_idpdv

gen region="CORSE"
replace region="ILE-DE-FRANCE" if dep_str=="75" | dep_str=="77" | dep_str=="78" | dep_str=="91" | dep_str=="92" | dep_str=="93" | dep_str=="94" | dep_str=="95"
replace region="CHAMPAGNE-ARDENNE" if dep_str=="08" | dep_str=="10" | dep_str=="51" | dep_str=="52"
replace region="PICARDIE" if dep_str=="02" | dep_str=="60" | dep_str=="80"
replace region="HAUTE-NORMANDIE" if dep_str=="76" | dep_str=="27"
replace region="CENTRE" if dep_str=="18" | dep_str=="28" | dep_str=="36" | dep_str=="37" | dep_str=="41" | dep_str=="45"
replace region="BASSE-NORMANDIE" if dep_str=="14" | dep_str=="50" | dep_str=="61"
replace region="BOURGOGNE" if dep_str=="21" | dep=="58" | dep_str=="71" | dep_str=="89"
replace region="NORD-PAS-DE-CALAIS" if dep_str=="59" | dep_str=="62"
replace region="LORRAINE" if dep_str=="54" | dep_str=="55" | dep_str=="57" | dep_str=="88"
replace region="ALSACE" if dep_str=="67" | dep_str=="68"
replace region="FRANCHE-COMTE" if dep_str=="25" | dep_str=="39" | dep_str=="70" | dep_str=="90"
replace region="PAYS-DE-LA-LOIRE" if dep_str=="44" | dep_str=="49" | dep_str=="53" | dep_str=="72" | dep_str=="85"
replace region="BRETAGNE" if dep_str=="22" | dep_str=="29" | dep_str=="35" | dep_str=="56"
replace region="POITOU-CHARENTES" if dep_str=="16" | dep_str=="17" | dep_str=="79" | dep_str=="86"
replace region="AQUITAINE" if dep_str=="24" | dep_str=="33" | dep_str=="40" | dep_str=="47" | dep_str=="64"
replace region="MIDI-PYRENEES" if dep_str=="09" | dep_str=="12" | dep_str=="31" | dep_str=="32" | dep_str=="46" | dep_str=="65" | dep_str=="81" | dep_str=="82"
replace region="LIMOUSIN" if dep_str=="19" | dep_str=="23" | dep_str=="87"
replace region="RHONE-ALPES" if dep_str=="01" | dep_str=="07" | dep_str=="26" | dep_str=="38" | dep_str=="42" | dep_str=="69" |dep_str=="73" | dep_str=="74"
replace region="AUVERGNE" if dep_str=="03" | dep_str=="15" | dep_str=="43" | dep_str=="63"
replace region="LANGUEDOC-ROUSSILLON" if dep_str=="11" | dep_str=="30" | dep_str=="34" | dep_str=="48" | dep_str=="66"
replace region="PACA" if dep_str=="04" | dep_str=="05" | dep_str=="06" | dep_str=="13" | dep_str=="83" | dep_str=="84"

gen region_num=11 if region=="ILE-DE-FRANCE"
replace region_num=21 if region=="CHAMPAGNE-ARDENNE"
replace region_num=22 if region=="PICARDIE"
replace region_num=23 if region=="HAUTE-NORMANDIE"
replace region_num=24 if region=="CENTRE"
replace region_num=25 if region=="BASSE-NORMANDIE"
replace region_num=26 if region=="BOURGOGNE"
replace region_num=31 if region=="NORD-PAS-DE-CALAIS"
replace region_num=41 if region=="LORRAINE"
replace region_num=42 if region=="ALSACE"
replace region_num=43 if region=="FRANCHE-COMTE"
replace region_num=52 if region=="PAYS-DE-LA-LOIRE"
replace region_num=53 if region=="BRETAGNE"
replace region_num=54 if region=="POITOU-CHARENTES"
replace region_num=72 if region=="AQUITAINE"
replace region_num=73 if region=="MIDI-PYRENEES"
replace region_num=74 if region=="LIMOUSIN"
replace region_num=82 if region=="RHONE-ALPES"
replace region_num=83 if region=="AUVERGNE"
replace region_num=91 if region=="LANGUEDOC-ROUSSILLON"
replace region_num=93 if region=="PACA"

gen new_region_num=84 if region=="AUVERGNE" | region=="RHONE-ALPES" // Auvergne-Rhône-Alpes
replace new_region_num=27 if region=="BOURGOGNE" | region=="FRANCHE-COMTE" //Bourgogne-Franche-Comté
replace new_region_num=53 if region=="BRETAGNE"
replace new_region_num=24 if region=="CENTRE"
replace new_region_num=94 if region=="CORSE"
replace new_region_num=44 if region=="ALSACE" | region=="LORRAINE" | region=="CHAMPAGNE-ARDENNE" // Grand-Est
replace new_region_num=32 if region=="NORD-PAS-DE-CALAIS" | region=="PICARDIE" //Hauts-de-France
replace new_region_num=11 if region=="ILE-DE-FRANCE"
replace new_region_num=28 if region=="BASSE-NORMANDIE" | region=="HAUTE-NORMANDIE" // Normandie
replace new_region_num=75 if region=="AQUITAINE" | region=="LIMOUSIN" | region=="POITOU-CHARENTES" //Nouvelle Aquitaine
replace new_region_num=76 if region=="LANGUEDOC-ROUSSILLON" | region=="MIDI-PYRENEES" // Occitanie
replace new_region_num=52 if region=="PAYS-DE-LA-LOIRE"
replace new_region_num=93 if region=="PACA"

capture drop date_maj2
gen year=year(date_maj)


// Gen TICPE

************************** 2007 *******************************

gen tx_TICPE_sp95=60.32 if region=="ALSACE" & year==2007
replace tx_TICPE_sp95=60.04 if region=="AQUITAINE" & year==2007
replace tx_TICPE_sp95=60.14 if region=="AUVERGNE" & year==2007
replace tx_TICPE_sp95=60.31 if region=="BASSE-NORMANDIE" & year==2007
replace tx_TICPE_sp95=59.78 if region=="BOURGOGNE" & year==2007
replace tx_TICPE_sp95=60.02 if region=="BRETAGNE" & year==2007
replace tx_TICPE_sp95=60.69 if region=="CENTRE" & year==2007
replace tx_TICPE_sp95=60.09 if region=="CHAMPAGNE-ARDENNE" & year==2007
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2007 // Réfaction d'un euro par litre
replace tx_TICPE_sp95=60.27 if region=="FRANCHE-COMTE" & year==2007
replace tx_TICPE_sp95=60.69 if region=="HAUTE-NORMANDIE" & year==2007
replace tx_TICPE_sp95=60.69 if region=="ILE-DE-FRANCE" & year==2007
replace tx_TICPE_sp95=60.20 if region=="LANGUEDOC-ROUSSILLON" & year==2007
replace tx_TICPE_sp95=60.58 if region=="LIMOUSIN" & year==2007
replace tx_TICPE_sp95=60.69 if region=="LORRAINE" & year==2007
replace tx_TICPE_sp95=60.03 if region=="MIDI-PYRENEES" & year==2007
replace tx_TICPE_sp95=60.69 if region=="NORD-PAS-DE-CALAIS" & year==2007
replace tx_TICPE_sp95=59.93 if region=="PAYS-DE-LA-LOIRE" & year==2007
replace tx_TICPE_sp95=60.69 if region=="PICARDIE" & year==2007
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2007
replace tx_TICPE_sp95=59.90 if region=="PACA" & year==2007
replace tx_TICPE_sp95=60.09 if region=="RHONE-ALPES" & year==2007



gen tx_TICPE_ga=42.84 if region=="ALSACE" & year==2007
replace tx_TICPE_ga=42.47 if region=="AQUITAINE" & year==2007
replace tx_TICPE_ga=42.54 if region=="AUVERGNE" & year==2007
replace tx_TICPE_ga=42.66 if region=="BASSE-NORMANDIE" & year==2007
replace tx_TICPE_ga=42.29 if region=="BOURGOGNE" & year==2007
replace tx_TICPE_ga=42.47 if region=="BRETAGNE" & year==2007
replace tx_TICPE_ga=42.84 if region=="CENTRE" & year==2007
replace tx_TICPE_ga=42.52 if region=="CHAMPAGNE-ARDENNE" & year==2007
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2007
replace tx_TICPE_ga=42.64 if region=="FRANCHE-COMTE" & year==2007
replace tx_TICPE_ga=42.84 if region=="HAUTE-NORMANDIE" & year==2007
replace tx_TICPE_ga=42.84 if region=="ILE-DE-FRANCE" & year==2007
replace tx_TICPE_ga=42.59 if region=="LANGUEDOC-ROUSSILLON" & year==2007
replace tx_TICPE_ga=42.84 if region=="LIMOUSIN" & year==2007
replace tx_TICPE_ga=42.84 if region=="LORRAINE" & year==2007
replace tx_TICPE_ga=42.48 if region=="MIDI-PYRENEES" & year==2007
replace tx_TICPE_ga=42.84 if region=="NORD-PAS-DE-CALAIS" & year==2007
replace tx_TICPE_ga=42.40 if region=="PAYS-DE-LA-LOIRE" & year==2007
replace tx_TICPE_ga=42.84 if region=="PICARDIE" & year==2007
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2007
replace tx_TICPE_ga=42.37 if region=="PACA" & year==2007
replace tx_TICPE_ga=42.52 if region=="RHONE-ALPES" & year==2007



************************** 2008 *******************************

replace tx_TICPE_sp95=60.69 if region=="ALSACE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="AQUITAINE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="AUVERGNE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="BASSE-NORMANDIE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="BOURGOGNE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="BRETAGNE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="CENTRE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="CHAMPAGNE-ARDENNE" & year==2008
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2008 // Réfaction d'un euro par litre
replace tx_TICPE_sp95=60.27 if region=="FRANCHE-COMTE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="HAUTE-NORMANDIE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="ILE-DE-FRANCE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="LANGUEDOC-ROUSSILLON" & year==2008
replace tx_TICPE_sp95=60.69 if region=="LIMOUSIN" & year==2008
replace tx_TICPE_sp95=60.69 if region=="LORRAINE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="MIDI-PYRENEES" & year==2008
replace tx_TICPE_sp95=60.69 if region=="NORD-PAS-DE-CALAIS" & year==2008
replace tx_TICPE_sp95=60.69 if region=="PAYS-DE-LA-LOIRE" & year==2008
replace tx_TICPE_sp95=60.69 if region=="PICARDIE" & year==2008
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2008
replace tx_TICPE_sp95=60.69 if region=="PACA" & year==2008
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2008


replace tx_TICPE_ga=42.84 if region=="ALSACE" & year==2008
replace tx_TICPE_ga=42.84 if region=="AQUITAINE" & year==2008
replace tx_TICPE_ga=42.84 if region=="AUVERGNE" & year==2008
replace tx_TICPE_ga=42.84 if region=="BASSE-NORMANDIE" & year==2008
replace tx_TICPE_ga=42.84 if region=="BOURGOGNE" & year==2008
replace tx_TICPE_ga=42.84 if region=="BRETAGNE" & year==2008
replace tx_TICPE_ga=42.84 if region=="CENTRE" & year==2008
replace tx_TICPE_ga=42.84 if region=="CHAMPAGNE-ARDENNE" & year==2008
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2008
replace tx_TICPE_ga=42.84 if region=="FRANCHE-COMTE" & year==2008
replace tx_TICPE_ga=42.84 if region=="HAUTE-NORMANDIE" & year==2008
replace tx_TICPE_ga=42.84 if region=="ILE-DE-FRANCE" & year==2008
replace tx_TICPE_ga=42.84 if region=="LANGUEDOC-ROUSSILLON" & year==2008
replace tx_TICPE_ga=42.84 if region=="LIMOUSIN" & year==2008
replace tx_TICPE_ga=42.84 if region=="LORRAINE" & year==2008
replace tx_TICPE_ga=42.84 if region=="MIDI-PYRENEES" & year==2008
replace tx_TICPE_ga=42.84 if region=="NORD-PAS-DE-CALAIS" & year==2008
replace tx_TICPE_ga=42.84 if region=="PAYS-DE-LA-LOIRE" & year==2008
replace tx_TICPE_ga=42.84 if region=="PICARDIE" & year==2008
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2008
replace tx_TICPE_ga=42.84 if region=="PACA" & year==2008
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2008


************************** 2009 *******************************

replace tx_TICPE_sp95=60.69 if region=="ALSACE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="AQUITAINE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="AUVERGNE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="BASSE-NORMANDIE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="BOURGOGNE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="BRETAGNE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="CENTRE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="CHAMPAGNE-ARDENNE" & year==2009
replace tx_TICPE_sp95=58.93 if region=="CORSE" & year==2009 // Réfaction d'un euro par litre
replace tx_TICPE_sp95=60.69 if region=="FRANCHE-COMTE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="HAUTE-NORMANDIE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="ILE-DE-FRANCE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="LANGUEDOC-ROUSSILLON" & year==2009
replace tx_TICPE_sp95=60.69 if region=="LIMOUSIN" & year==2009
replace tx_TICPE_sp95=60.69 if region=="LORRAINE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="MIDI-PYRENEES" & year==2009
replace tx_TICPE_sp95=60.69 if region=="NORD-PAS-DE-CALAIS" & year==2009
replace tx_TICPE_sp95=60.69 if region=="PAYS-DE-LA-LOIRE" & year==2009
replace tx_TICPE_sp95=60.69 if region=="PICARDIE" & year==2009
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2009
replace tx_TICPE_sp95=60.69 if region=="PACA" & year==2009
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2009


replace tx_TICPE_ga=42.84 if region=="ALSACE" & year==2009
replace tx_TICPE_ga=42.84 if region=="AQUITAINE" & year==2009
replace tx_TICPE_ga=42.84 if region=="AUVERGNE" & year==2009
replace tx_TICPE_ga=42.84 if region=="BASSE-NORMANDIE" & year==2009
replace tx_TICPE_ga=42.84 if region=="BOURGOGNE" & year==2009
replace tx_TICPE_ga=42.84 if region=="BRETAGNE" & year==2009
replace tx_TICPE_ga=42.84 if region=="CENTRE" & year==2009
replace tx_TICPE_ga=42.84 if region=="CHAMPAGNE-ARDENNE" & year==2009
replace tx_TICPE_ga=42.29 if region=="CORSE" & year==2009
replace tx_TICPE_ga=42.84 if region=="FRANCHE-COMTE" & year==2009
replace tx_TICPE_ga=42.84 if region=="HAUTE-NORMANDIE" & year==2009
replace tx_TICPE_ga=42.84 if region=="ILE-DE-FRANCE" & year==2009
replace tx_TICPE_ga=42.84 if region=="LANGUEDOC-ROUSSILLON" & year==2009
replace tx_TICPE_ga=42.84 if region=="LIMOUSIN" & year==2009
replace tx_TICPE_ga=42.84 if region=="LORRAINE" & year==2009
replace tx_TICPE_ga=42.84 if region=="MIDI-PYRENEES" & year==2009
replace tx_TICPE_ga=42.84 if region=="NORD-PAS-DE-CALAIS" & year==2009
replace tx_TICPE_ga=42.84 if region=="PAYS-DE-LA-LOIRE" & year==2009
replace tx_TICPE_ga=42.84 if region=="PICARDIE" & year==2009
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2009
replace tx_TICPE_ga=42.84 if region=="PACA" & year==2009
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2009

************************** 2010 *******************************

replace tx_TICPE_sp95=60.69 if region=="ALSACE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="AQUITAINE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="AUVERGNE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="BASSE-NORMANDIE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="BOURGOGNE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="BRETAGNE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="CENTRE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="CHAMPAGNE-ARDENNE" & year==2010
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2010 
replace tx_TICPE_sp95=60.69 if region=="FRANCHE-COMTE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="HAUTE-NORMANDIE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="ILE-DE-FRANCE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="LANGUEDOC-ROUSSILLON" & year==2010
replace tx_TICPE_sp95=60.69 if region=="LIMOUSIN" & year==2010
replace tx_TICPE_sp95=60.69 if region=="LORRAINE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="MIDI-PYRENEES" & year==2010
replace tx_TICPE_sp95=60.69 if region=="NORD-PAS-DE-CALAIS" & year==2010
replace tx_TICPE_sp95=60.69 if region=="PAYS-DE-LA-LOIRE" & year==2010
replace tx_TICPE_sp95=60.69 if region=="PICARDIE" & year==2010
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2010
replace tx_TICPE_sp95=60.69 if region=="PACA" & year==2010
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2010


replace tx_TICPE_ga=42.84 if region=="ALSACE" & year==2010
replace tx_TICPE_ga=42.84 if region=="AQUITAINE" & year==2010
replace tx_TICPE_ga=42.84 if region=="AUVERGNE" & year==2010
replace tx_TICPE_ga=42.84 if region=="BASSE-NORMANDIE" & year==2010
replace tx_TICPE_ga=42.84 if region=="BOURGOGNE" & year==2010
replace tx_TICPE_ga=42.84 if region=="BRETAGNE" & year==2010
replace tx_TICPE_ga=42.84 if region=="CENTRE" & year==2010
replace tx_TICPE_ga=42.84 if region=="CHAMPAGNE-ARDENNE" & year==2010
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2010
replace tx_TICPE_ga=42.84 if region=="FRANCHE-COMTE" & year==2010
replace tx_TICPE_ga=42.84 if region=="HAUTE-NORMANDIE" & year==2010
replace tx_TICPE_ga=42.84 if region=="ILE-DE-FRANCE" & year==2010
replace tx_TICPE_ga=42.84 if region=="LANGUEDOC-ROUSSILLON" & year==2010
replace tx_TICPE_ga=42.84 if region=="LIMOUSIN" & year==2010
replace tx_TICPE_ga=42.84 if region=="LORRAINE" & year==2010
replace tx_TICPE_ga=42.84 if region=="MIDI-PYRENEES" & year==2010
replace tx_TICPE_ga=42.84 if region=="NORD-PAS-DE-CALAIS" & year==2010
replace tx_TICPE_ga=42.84 if region=="PAYS-DE-LA-LOIRE" & year==2010
replace tx_TICPE_ga=42.84 if region=="PICARDIE" & year==2010
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2010
replace tx_TICPE_ga=42.84 if region=="PACA" & year==2010
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2010

************************** 2011 *******************************

replace tx_TICPE_sp95=61.42 if region=="ALSACE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="AQUITAINE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="AUVERGNE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="BASSE-NORMANDIE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="BOURGOGNE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="BRETAGNE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="CENTRE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="CHAMPAGNE-ARDENNE" & year==2011
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2011 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=61.42 if region=="FRANCHE-COMTE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="HAUTE-NORMANDIE" & year==2011
replace tx_TICPE_sp95=60.69 if region=="ILE-DE-FRANCE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="LANGUEDOC-ROUSSILLON" & year==2011
replace tx_TICPE_sp95=61.42 if region=="LIMOUSIN" & year==2011
replace tx_TICPE_sp95=61.42 if region=="LORRAINE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="MIDI-PYRENEES" & year==2011
replace tx_TICPE_sp95=61.42 if region=="NORD-PAS-DE-CALAIS" & year==2011
replace tx_TICPE_sp95=61.42 if region=="PAYS-DE-LA-LOIRE" & year==2011
replace tx_TICPE_sp95=61.42 if region=="PICARDIE" & year==2011
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2011
replace tx_TICPE_sp95=60.69 if region=="PACA" & year==2011
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2011


replace tx_TICPE_ga=44.19 if region=="ALSACE" & year==2011
replace tx_TICPE_ga=44.19 if region=="AQUITAINE" & year==2011
replace tx_TICPE_ga=44.19 if region=="AUVERGNE" & year==2011
replace tx_TICPE_ga=44.19 if region=="BASSE-NORMANDIE" & year==2011
replace tx_TICPE_ga=44.19 if region=="BOURGOGNE" & year==2011
replace tx_TICPE_ga=44.19 if region=="BRETAGNE" & year==2011
replace tx_TICPE_ga=44.19 if region=="CENTRE" & year==2011
replace tx_TICPE_ga=44.19 if region=="CHAMPAGNE-ARDENNE" & year==2011
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2011
replace tx_TICPE_ga=44.19 if region=="FRANCHE-COMTE" & year==2011
replace tx_TICPE_ga=44.19 if region=="HAUTE-NORMANDIE" & year==2011
replace tx_TICPE_ga=42.84 if region=="ILE-DE-FRANCE" & year==2011
replace tx_TICPE_ga=44.19 if region=="LANGUEDOC-ROUSSILLON" & year==2011
replace tx_TICPE_ga=44.19 if region=="LIMOUSIN" & year==2011
replace tx_TICPE_ga=44.19 if region=="LORRAINE" & year==2011
replace tx_TICPE_ga=44.19 if region=="MIDI-PYRENEES" & year==2011
replace tx_TICPE_ga=44.19 if region=="NORD-PAS-DE-CALAIS" & year==2011
replace tx_TICPE_ga=44.19 if region=="PAYS-DE-LA-LOIRE" & year==2011
replace tx_TICPE_ga=44.19 if region=="PICARDIE" & year==2011
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2011
replace tx_TICPE_ga=42.84 if region=="PACA" & year==2011
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2011


************************** 2012 *******************************

replace tx_TICPE_sp95=61.42 if region=="ALSACE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="AQUITAINE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="AUVERGNE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="BASSE-NORMANDIE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="BOURGOGNE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="BRETAGNE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="CENTRE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="CHAMPAGNE-ARDENNE" & year==2012
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2012 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=61.42 if region=="FRANCHE-COMTE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="HAUTE-NORMANDIE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="ILE-DE-FRANCE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="LANGUEDOC-ROUSSILLON" & year==2012
replace tx_TICPE_sp95=61.42 if region=="LIMOUSIN" & year==2012
replace tx_TICPE_sp95=61.42 if region=="LORRAINE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="MIDI-PYRENEES" & year==2012
replace tx_TICPE_sp95=61.42 if region=="NORD-PAS-DE-CALAIS" & year==2012
replace tx_TICPE_sp95=61.42 if region=="PAYS-DE-LA-LOIRE" & year==2012
replace tx_TICPE_sp95=61.42 if region=="PICARDIE" & year==2012
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2012
replace tx_TICPE_sp95=61.42 if region=="PACA" & year==2012
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2012

replace tx_TICPE_ga=44.19 if region=="ALSACE" & year==2012
replace tx_TICPE_ga=44.19 if region=="AQUITAINE" & year==2012
replace tx_TICPE_ga=44.19 if region=="AUVERGNE" & year==2012
replace tx_TICPE_ga=44.19 if region=="BASSE-NORMANDIE" & year==2012
replace tx_TICPE_ga=44.19 if region=="BOURGOGNE" & year==2012
replace tx_TICPE_ga=44.19 if region=="BRETAGNE" & year==2012
replace tx_TICPE_ga=44.19 if region=="CENTRE" & year==2012
replace tx_TICPE_ga=44.19 if region=="CHAMPAGNE-ARDENNE" & year==2012
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2012
replace tx_TICPE_ga=44.19 if region=="FRANCHE-COMTE" & year==2012
replace tx_TICPE_ga=44.19 if region=="HAUTE-NORMANDIE" & year==2012
replace tx_TICPE_ga=44.19 if region=="ILE-DE-FRANCE" & year==2012
replace tx_TICPE_ga=44.19 if region=="LANGUEDOC-ROUSSILLON" & year==2012
replace tx_TICPE_ga=44.19 if region=="LIMOUSIN" & year==2012
replace tx_TICPE_ga=44.19 if region=="LORRAINE" & year==2012
replace tx_TICPE_ga=44.19 if region=="MIDI-PYRENEES" & year==2012
replace tx_TICPE_ga=44.19 if region=="NORD-PAS-DE-CALAIS" & year==2012
replace tx_TICPE_ga=44.19 if region=="PAYS-DE-LA-LOIRE" & year==2012
replace tx_TICPE_ga=44.19 if region=="PICARDIE" & year==2012
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2012
replace tx_TICPE_ga=44.19 if region=="PACA" & year==2012
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2012


************************** 2013 *******************************
// Until January 10

replace tx_TICPE_sp95=60.42 if region=="ALSACE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="AQUITAINE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="AUVERGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="BASSE-NORMANDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="BOURGOGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="BRETAGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="CENTRE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="CHAMPAGNE-ARDENNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=56.92 if region=="CORSE" & year==2013 & date_maj>=19359 & date_maj<=19368  // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=60.42 if region=="FRANCHE-COMTE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="HAUTE-NORMANDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="ILE-DE-FRANCE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="LANGUEDOC-ROUSSILLON" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="LIMOUSIN" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="LORRAINE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="MIDI-PYRENEES" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="NORD-PAS-DE-CALAIS" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="PAYS-DE-LA-LOIRE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="PICARDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=57.92 if region=="POITOU-CHARENTES" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_sp95=60.42 if region=="PACA" & year==2013 & date_maj>=19359 & date_maj<=19368  
replace tx_TICPE_sp95=59.69 if region=="RHONE-ALPES" & year==2013 & date_maj>=19359 & date_maj<=19368 

replace tx_TICPE_ga=43.19 if region=="ALSACE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="AQUITAINE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="AUVERGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="BASSE-NORMANDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="BOURGOGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="BRETAGNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="CENTRE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="CHAMPAGNE-ARDENNE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=40.69 if region=="CORSE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="FRANCHE-COMTE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="HAUTE-NORMANDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="ILE-DE-FRANCE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="LANGUEDOC-ROUSSILLON" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="LIMOUSIN" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="LORRAINE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="MIDI-PYRENEES" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="NORD-PAS-DE-CALAIS" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="PAYS-DE-LA-LOIRE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="PICARDIE" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=40.69 if region=="POITOU-CHARENTES" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=43.19 if region=="PACA" & year==2013 & date_maj>=19359 & date_maj<=19368 
replace tx_TICPE_ga=41.84 if region=="RHONE-ALPES" & year==2013 & date_maj>=19359 & date_maj<=19368 

// Starting from january 11


replace tx_TICPE_sp95=61.42 if region=="ALSACE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="AQUITAINE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="AUVERGNE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="BASSE-NORMANDIE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="BOURGOGNE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="BRETAGNE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="CENTRE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="CHAMPAGNE-ARDENNE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2013 & date_maj>=19369 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=61.42 if region=="FRANCHE-COMTE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="HAUTE-NORMANDIE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="ILE-DE-FRANCE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="LANGUEDOC-ROUSSILLON" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="LIMOUSIN" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="LORRAINE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="MIDI-PYRENEES" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="NORD-PAS-DE-CALAIS" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="PAYS-DE-LA-LOIRE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="PICARDIE" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=61.42 if region=="PACA" & year==2013 & date_maj>=19369
replace tx_TICPE_sp95=60.69 if region=="RHONE-ALPES" & year==2013 & date_maj>=19369

replace tx_TICPE_ga=44.19 if region=="ALSACE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="AQUITAINE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="AUVERGNE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="BASSE-NORMANDIE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="BOURGOGNE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="BRETAGNE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="CENTRE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="CHAMPAGNE-ARDENNE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="FRANCHE-COMTE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="HAUTE-NORMANDIE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="ILE-DE-FRANCE" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=44.19 if region=="LANGUEDOC-ROUSSILLON" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="LIMOUSIN" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="LORRAINE" & year==2013 & date_maj>=19369 
replace tx_TICPE_ga=44.19 if region=="MIDI-PYRENEES" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=44.19 if region=="NORD-PAS-DE-CALAIS" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=44.19 if region=="PAYS-DE-LA-LOIRE" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=44.19 if region=="PICARDIE" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=44.19 if region=="PACA" & year==2013 & date_maj>=19369
replace tx_TICPE_ga=42.84 if region=="RHONE-ALPES" & year==2013 & date_maj>=19369


************************** 2014 *******************************

replace tx_TICPE_sp95=61.42 if region=="ALSACE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="AQUITAINE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="AUVERGNE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="BASSE-NORMANDIE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="BOURGOGNE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="BRETAGNE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="CENTRE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="CHAMPAGNE-ARDENNE" & year==2014
replace tx_TICPE_sp95=57.92 if region=="CORSE" & year==2014 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=61.42 if region=="FRANCHE-COMTE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="HAUTE-NORMANDIE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="ILE-DE-FRANCE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="LANGUEDOC-ROUSSILLON" & year==2014
replace tx_TICPE_sp95=61.42 if region=="LIMOUSIN" & year==2014
replace tx_TICPE_sp95=61.42 if region=="LORRAINE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="MIDI-PYRENEES" & year==2014
replace tx_TICPE_sp95=61.42 if region=="NORD-PAS-DE-CALAIS" & year==2014
replace tx_TICPE_sp95=61.42 if region=="PAYS-DE-LA-LOIRE" & year==2014
replace tx_TICPE_sp95=61.42 if region=="PICARDIE" & year==2014
replace tx_TICPE_sp95=58.92 if region=="POITOU-CHARENTES" & year==2014
replace tx_TICPE_sp95=61.42 if region=="PACA" & year==2014
replace tx_TICPE_sp95=61.42 if region=="RHONE-ALPES" & year==2014

replace tx_TICPE_ga=44.19 if region=="ALSACE" & year==2014
replace tx_TICPE_ga=44.19 if region=="AQUITAINE" & year==2014
replace tx_TICPE_ga=44.19 if region=="AUVERGNE" & year==2014
replace tx_TICPE_ga=44.19 if region=="BASSE-NORMANDIE" & year==2014
replace tx_TICPE_ga=44.19 if region=="BOURGOGNE" & year==2014
replace tx_TICPE_ga=44.19 if region=="BRETAGNE" & year==2014
replace tx_TICPE_ga=44.19 if region=="CENTRE" & year==2014
replace tx_TICPE_ga=44.19 if region=="CHAMPAGNE-ARDENNE" & year==2014
replace tx_TICPE_ga=41.69 if region=="CORSE" & year==2014
replace tx_TICPE_ga=44.19 if region=="FRANCHE-COMTE" & year==2014
replace tx_TICPE_ga=44.19 if region=="HAUTE-NORMANDIE" & year==2014
replace tx_TICPE_ga=44.19 if region=="ILE-DE-FRANCE" & year==2014
replace tx_TICPE_ga=44.19 if region=="LANGUEDOC-ROUSSILLON" & year==2014
replace tx_TICPE_ga=44.19 if region=="LIMOUSIN" & year==2014
replace tx_TICPE_ga=44.19 if region=="LORRAINE" & year==2014
replace tx_TICPE_ga=44.19 if region=="MIDI-PYRENEES" & year==2014
replace tx_TICPE_ga=44.19 if region=="NORD-PAS-DE-CALAIS" & year==2014
replace tx_TICPE_ga=44.19 if region=="PAYS-DE-LA-LOIRE" & year==2014
replace tx_TICPE_ga=44.19 if region=="PICARDIE" & year==2014
replace tx_TICPE_ga=41.69 if region=="POITOU-CHARENTES" & year==2014
replace tx_TICPE_ga=44.19 if region=="PACA" & year==2014
replace tx_TICPE_ga=44.19 if region=="RHONE-ALPES" & year==2014


************************** 2015 *******************************

replace tx_TICPE_sp95=63.14 if region=="ALSACE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="AQUITAINE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="AUVERGNE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="BASSE-NORMANDIE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="BOURGOGNE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="BRETAGNE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="CENTRE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="CHAMPAGNE-ARDENNE" & year==2015
replace tx_TICPE_sp95=59.64 if region=="CORSE" & year==2015 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=63.14 if region=="FRANCHE-COMTE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="HAUTE-NORMANDIE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="ILE-DE-FRANCE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="LANGUEDOC-ROUSSILLON" & year==2015
replace tx_TICPE_sp95=63.14 if region=="LIMOUSIN" & year==2015
replace tx_TICPE_sp95=63.14 if region=="LORRAINE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="MIDI-PYRENEES" & year==2015
replace tx_TICPE_sp95=63.14 if region=="NORD-PAS-DE-CALAIS" & year==2015
replace tx_TICPE_sp95=63.14 if region=="PAYS-DE-LA-LOIRE" & year==2015
replace tx_TICPE_sp95=63.14 if region=="PICARDIE" & year==2015
replace tx_TICPE_sp95=60.64 if region=="POITOU-CHARENTES" & year==2015
replace tx_TICPE_sp95=63.14 if region=="PACA" & year==2015
replace tx_TICPE_sp95=63.14 if region=="RHONE-ALPES" & year==2015

replace tx_TICPE_ga=48.17 if region=="ALSACE" & year==2015
replace tx_TICPE_ga=48.17 if region=="AQUITAINE" & year==2015
replace tx_TICPE_ga=48.17 if region=="AUVERGNE" & year==2015
replace tx_TICPE_ga=48.17 if region=="BASSE-NORMANDIE" & year==2015
replace tx_TICPE_ga=48.17 if region=="BOURGOGNE" & year==2015
replace tx_TICPE_ga=48.17 if region=="BRETAGNE" & year==2015
replace tx_TICPE_ga=48.17 if region=="CENTRE" & year==2015
replace tx_TICPE_ga=48.17 if region=="CHAMPAGNE-ARDENNE" & year==2015
replace tx_TICPE_ga=45.67 if region=="CORSE" & year==2015
replace tx_TICPE_ga=48.17 if region=="FRANCHE-COMTE" & year==2015
replace tx_TICPE_ga=48.17 if region=="HAUTE-NORMANDIE" & year==2015
replace tx_TICPE_ga=48.17 if region=="ILE-DE-FRANCE" & year==2015
replace tx_TICPE_ga=48.17 if region=="LANGUEDOC-ROUSSILLON" & year==2015
replace tx_TICPE_ga=48.17 if region=="LIMOUSIN" & year==2015
replace tx_TICPE_ga=48.17 if region=="LORRAINE" & year==2015
replace tx_TICPE_ga=48.17 if region=="MIDI-PYRENEES" & year==2015
replace tx_TICPE_ga=48.17 if region=="NORD-PAS-DE-CALAIS" & year==2015
replace tx_TICPE_ga=48.17 if region=="PAYS-DE-LA-LOIRE" & year==2015
replace tx_TICPE_ga=48.17 if region=="PICARDIE" & year==2015
replace tx_TICPE_ga=45.67 if region=="POITOU-CHARENTES" & year==2015
replace tx_TICPE_ga=48.17 if region=="PACA" & year==2015
replace tx_TICPE_ga=48.17 if region=="RHONE-ALPES" & year==2015


************************** 2016 *******************************
**** Du 1er janvier au 30 juin ****
replace tx_TICPE_sp95=64.85 if region=="ALSACE" & year==2016 & date_maj>=20454 & date_maj<=20635 // A modifier
replace tx_TICPE_sp95=64.85 if region=="AQUITAINE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="AUVERGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="BASSE-NORMANDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="BOURGOGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="BRETAGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="CENTRE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="CHAMPAGNE-ARDENNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=61.35 if region=="CORSE" & year==2016 & date_maj>=20454 & date_maj<=20635 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=64.85 if region=="FRANCHE-COMTE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="HAUTE-NORMANDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="ILE-DE-FRANCE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="LANGUEDOC-ROUSSILLON" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="LIMOUSIN" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="LORRAINE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="MIDI-PYRENEES" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="NORD-PAS-DE-CALAIS" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="PAYS-DE-LA-LOIRE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="PICARDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=62.35 if region=="POITOU-CHARENTES" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="PACA" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_sp95=64.85 if region=="RHONE-ALPES" & year==2016 & date_maj>=20454 & date_maj<=20635

replace tx_TICPE_ga=51.16 if region=="ALSACE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="AQUITAINE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="AUVERGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="BASSE-NORMANDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="BOURGOGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="BRETAGNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="CENTRE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="CHAMPAGNE-ARDENNE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=48.66 if region=="CORSE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="FRANCHE-COMTE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="HAUTE-NORMANDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="ILE-DE-FRANCE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="LANGUEDOC-ROUSSILLON" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="LIMOUSIN" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="LORRAINE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="MIDI-PYRENEES" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="NORD-PAS-DE-CALAIS" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="PAYS-DE-LA-LOIRE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="PICARDIE" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=48.66 if region=="POITOU-CHARENTES" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="PACA" & year==2016 & date_maj>=20454 & date_maj<=20635
replace tx_TICPE_ga=51.16 if region=="RHONE-ALPES" & year==2016 & date_maj>=20454 & date_maj<=20635



***** Du 1er juillet au 31 décembre

replace tx_TICPE_sp95=64.85 if region=="ALSACE" & year==2016 & date_maj>20635 // A modifier
replace tx_TICPE_sp95=64.85 if region=="AQUITAINE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="AUVERGNE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="BASSE-NORMANDIE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="BOURGOGNE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="BRETAGNE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="CENTRE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="CHAMPAGNE-ARDENNE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=61.35 if region=="CORSE" & year==2016 & date_maj>20635 // inclut la réfaction d'un euro par hectolitre
replace tx_TICPE_sp95=64.85 if region=="FRANCHE-COMTE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="HAUTE-NORMANDIE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="ILE-DE-FRANCE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="LANGUEDOC-ROUSSILLON" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="LIMOUSIN" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="LORRAINE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="MIDI-PYRENEES" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="NORD-PAS-DE-CALAIS" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="PAYS-DE-LA-LOIRE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="PICARDIE" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="POITOU-CHARENTES" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="PACA" & year==2016 & date_maj>20635
replace tx_TICPE_sp95=64.85 if region=="RHONE-ALPES" & year==2016 & date_maj>20635


replace tx_TICPE_ga=51.16 if region=="ALSACE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="AQUITAINE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="AUVERGNE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="BASSE-NORMANDIE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="BOURGOGNE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="BRETAGNE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="CENTRE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="CHAMPAGNE-ARDENNE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=48.66 if region=="CORSE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="FRANCHE-COMTE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="HAUTE-NORMANDIE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="ILE-DE-FRANCE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="LANGUEDOC-ROUSSILLON" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="LIMOUSIN" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="LORRAINE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="MIDI-PYRENEES" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="NORD-PAS-DE-CALAIS" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="PAYS-DE-LA-LOIRE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="PICARDIE" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="POITOU-CHARENTES" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="PACA" & year==2016 & date_maj>20635
replace tx_TICPE_ga=51.16 if region=="RHONE-ALPES" & year==2016 & date_maj>20635


************************** 2017 *******************************


replace tx_TICPE_sp95=65.80 if new_region_num==84 & year==2017 // Auvergne-Rhône-Alpes
replace tx_TICPE_sp95=65.80 if new_region_num==27 & year==2017 // Bourgogne-Franche-Comté
replace tx_TICPE_sp95=65.80 if new_region_num==53 & year==2017 // Bretagne
replace tx_TICPE_sp95=65.80 if new_region_num==24 & year==2017 // Centre
replace tx_TICPE_sp95=64.07 if new_region_num==94 & year==2017 // Corse - 1 euro de réfaction inclus
replace tx_TICPE_sp95=65.80 if new_region_num==44 & year==2017 // Grand-Est
replace tx_TICPE_sp95=65.80 if new_region_num==32 & year==2017 // Hauts-de-France
replace tx_TICPE_sp95=66.82 if new_region_num==11 & year==2017 // Ile-de-France - Modulation STIF
replace tx_TICPE_sp95=65.80 if new_region_num==28 & year==2017 // Normandie
replace tx_TICPE_sp95=65.80 if new_region_num==75 & year==2017 // Nouvelle-Aquitaine
replace tx_TICPE_sp95=65.80 if new_region_num==76 & year==2017 // Occitanie
replace tx_TICPE_sp95=65.80 if new_region_num==52 & year==2017 // Pays-de-la-Loire
replace tx_TICPE_sp95=65.80 if new_region_num==93 & year==2017 // PACA


replace tx_TICPE_ga=54.42 if new_region_num==84 & year==2017 // Auvergne-Rhône-Alpes
replace tx_TICPE_ga=54.42 if new_region_num==27 & year==2017 // Bourgogne-Franche-Comté
replace tx_TICPE_ga=54.42 if new_region_num==53 & year==2017 // Bretagne
replace tx_TICPE_ga=54.42 if new_region_num==24 & year==2017 // Centre
replace tx_TICPE_ga=53.07 if new_region_num==94 & year==2017 // Corse 
replace tx_TICPE_ga=54.42 if new_region_num==44 & year==2017 // Grand-Est
replace tx_TICPE_ga=54.42 if new_region_num==32 & year==2017 // Hauts-de-France
replace tx_TICPE_ga=56.31 if new_region_num==11 & year==2017 // Ile-de-France - Modulation STIF
replace tx_TICPE_ga=54.42 if new_region_num==28 & year==2017 // Normandie
replace tx_TICPE_ga=54.42 if new_region_num==75 & year==2017 // Nouvelle-Aquitaine
replace tx_TICPE_ga=54.42 if new_region_num==76 & year==2017 // Occitanie
replace tx_TICPE_ga=54.42 if new_region_num==52 & year==2017 // Pays-de-la-Loire
replace tx_TICPE_ga=54.42 if new_region_num==93 & year==2017 // PACA


************************* 2018 *******************************



replace tx_TICPE_sp95=69.02 if new_region_num==84 & year==2018 // Auvergne-Rhône-Alpes
replace tx_TICPE_sp95=69.02 if new_region_num==27 & year==2018 // Bourgogne-Franche-Comté
replace tx_TICPE_sp95=69.02 if new_region_num==53 & year==2018 // Bretagne
replace tx_TICPE_sp95=69.02 if new_region_num==24 & year==2018 // Centre
replace tx_TICPE_sp95=67.29 if new_region_num==94 & year==2018 // Corse - 1 euro de réfaction inclus
replace tx_TICPE_sp95=69.02 if new_region_num==44 & year==2018 // Grand-Est
replace tx_TICPE_sp95=69.02 if new_region_num==32 & year==2018 // Hauts-de-France
replace tx_TICPE_sp95=70.04 if new_region_num==11 & year==2018 // Ile-de-France - Modulation STIF
replace tx_TICPE_sp95=69.02 if new_region_num==28 & year==2018 // Normandie
replace tx_TICPE_sp95=69.02 if new_region_num==75 & year==2018 // Nouvelle-Aquitaine
replace tx_TICPE_sp95=69.02 if new_region_num==76 & year==2018 // Occitanie
replace tx_TICPE_sp95=69.02 if new_region_num==52 & year==2018 // Pays-de-la-Loire
replace tx_TICPE_sp95=69.02 if new_region_num==93 & year==2018 // PACA


replace tx_TICPE_ga=60.75 if new_region_num==84 & year==2018 // Auvergne-Rhône-Alpes
replace tx_TICPE_ga=60.75 if new_region_num==27 & year==2018 // Bourgogne-Franche-Comté
replace tx_TICPE_ga=60.75 if new_region_num==53 & year==2018 // Bretagne
replace tx_TICPE_ga=60.75 if new_region_num==24 & year==2018 // Centre
replace tx_TICPE_ga=59.40 if new_region_num==94 & year==2018 // Corse 
replace tx_TICPE_ga=60.75 if new_region_num==44 & year==2018 // Grand-Est
replace tx_TICPE_ga=60.75 if new_region_num==32 & year==2018 // Hauts-de-France
replace tx_TICPE_ga=62.64 if new_region_num==11 & year==2018 // Ile-de-France - Modulation STIF
replace tx_TICPE_ga=60.75 if new_region_num==28 & year==2018 // Normandie
replace tx_TICPE_ga=60.75 if new_region_num==75 & year==2018 // Nouvelle-Aquitaine
replace tx_TICPE_ga=60.75 if new_region_num==76 & year==2018 // Occitanie
replace tx_TICPE_ga=60.75 if new_region_num==52 & year==2018 // Pays-de-la-Loire
replace tx_TICPE_ga=60.75 if new_region_num==93 & year==2018 // PACA





*************************** Compute price variation before taxes  *******


**** "3"= e85 // "4"=gpl 

// After 2014
gen prix_ht=prix/(1+0.20)-tx_TICPE_ga*10 if id_carburant=="1" & year>=2014
replace prix_ht=prix/(1+0.20)-tx_TICPE_sp95*10 if id_carburant=="2" & year>=2014

// Before 2014
replace prix_ht=prix/(1+0.196)-tx_TICPE_ga*10 if id_carburant=="1" & year<2014
replace prix_ht=prix/(1+0.196)-tx_TICPE_sp95*10 if id_carburant=="2" & year<2014


drop tx_TICPE*
